package com.admin.common.enums;

/**
 * 评分状态 0 待提交 2 待区县评分
 */
public enum DeclareScoreStatusEnum {

    DELETED (-3, "已删除"),
    WAIT_SUBMIT (0, "待提交"),

    AREA_WAIT(10, "待区县评分"),
    AREA_PART_SUCCESS(11, "区县部分评分"),
    AREA_SUCCESS(12, "区县已评分"),
    AREA_RETURN(14, "区县退回"),

    CITY_WAIT(20, "待市级评分"),
    CITY_PART_SUCCESS(21, "市级部分评分"),
    CITY_SUCCESS(22, "市级已评分"),
    CITY_RETURN(24, "市级退回"),

    PROVINCE_WAIT(30, "待省级评分"),
    PROVINCE_PART_SUCCESS(31, "省级部分评分"),
    PROVINCE_SUCCESS(32, "省级已评分"),
    PROVINCE_RETURN(34, "省级退回"),

    FINISHED(1, "已完成");


    private Integer key;
    private String name;

    DeclareScoreStatusEnum(Integer key, String name) {
        this.key = key;
        this.name = name;
    }

    public Integer getKey() {
        return key;
    }


    public String getName() {
        return name;
    }

    public static String getText(Integer key) {
        if (key == null) {
            return null;
        }
        for (DeclareScoreStatusEnum e : DeclareScoreStatusEnum.values()) {
            if (e.getKey().equals(key)) {
                return e.getName();
            }
        }
        return null;
    }

}
